package main

import (
	"fmt"
	"net/http"
	"net/rpc"
)
const (
	URL= "192.168.1.27:9090"
)


var S string

type MyRPC int

func (r *MyRPC) HelloRPC(S string, reply *string) error {
	fmt.Println(S)
	*reply = "This Server. Hello Client RPC."
	return nil
}

func main() {
	r := new(MyRPC)
	rpc.Register(r)
	rpc.HandleHTTP()
	err := http.ListenAndServe(URL, nil)
	if err != nil {
		fmt.Println("in main", err.Error())
	}
}

